package com.itheima.homework.BankAccount_manager;

public class Test {
    public static void main(String[] args) {
        // 银行账号 1
        BankAccount user1 = new BankAccount();
        user1.setId(100);
        user1.setName("客户1");
        user1.setMoney(10000);

        user1.info();

        // 存钱
        user1.saveMoney(2000);
        user1.info();

        // 取钱
        user1.drawMoney(5000);
        user1.info();

        // 银行账号 2
        BankAccount user2 = new BankAccount();
        user2.setId(101);
        user2.setName("客户2");
        user2.setMoney(20000);

        user2.info();

        // 银行账号 2
        BankAccount user3 = new BankAccount();
        user3.setId(102);
        user3.setName("客户3");
        user3.setMoney(30000);

        user3.info();

        // saving账户
        SavingsAccount saving1 = new SavingsAccount();
        saving1.setId(200001);
        saving1.setName("saving客户001");
        saving1.setMoney(5000);

        saving1.info();

        // saving账户
        SavingsAccount saving2 = new SavingsAccount();
        saving2.setId(200002);
        saving2.setName("saving客户002");
        saving2.setMoney(50000);

        saving2.info();

        // current客户
        CurrentAccount currentAccount1 = new CurrentAccount();
        currentAccount1.setId(50000001);
        currentAccount1.setName("currrent客户 1");
        currentAccount1.setMoney(100);

        currentAccount1.info();

        // current客户
        CurrentAccount currentAccount2 = new CurrentAccount();
        currentAccount2.setId(50000001);
        currentAccount2.setName("currrent客户 1");
        currentAccount2.setMoney(100);

        currentAccount2.info();

        System.out.println("当前共有 " + BankAccount.getAccounts() + " 个客户");
    }
}
